1. Field of the Invention
The present invention discloses an encoding and decoding method, and more particularly, to an encoding and decoding method for a microdot matrix.
2. Description of the Prior Art
Please refer to FIG. 1, which is a diagram of a frame 102 generated by scanning a microdot matrix, where the microdot matrix includes a plurality of microdot blocks 120 arranged as a matrix, and the frame covers at least four complete microdot blocks 120. Note that each one of the four complete microdot blocks 120 is neighboring or next to other two of said four complete microdot blocks 120. As shown in FIG. 1, each microdot block 120 includes a plurality of microdots 160, and is segmented into a header region 122 and a data region 124. The header region 122 of each the microdot block 120 includes a plurality of microdots 160 distributed in a same combination and a same permutation for recognizing the plurality of covered microdot blocks 120 in the frame 102. The data region 124 of each the microdot block 120 includes a plurality of microdots 160 distributed with different combinations and permutations for indicating an encoded coordinate of each said microdot block 120 on the microdot matrix, where the encoded coordinate of each said microdot block 120 is the reason why the different combinations and permutations of the plurality of microdots 160 of different microdot blocks 120 are required. In other words, after recognizing the plurality of microdot blocks 120 covered by the frame 102, the coordinate of each the microdot block 120 on the microdot matrix may be decoded according to the plurality of microdots 160 of the data region 122 of each said microdot block 120.
The prior art mentioned in FIG. 1 may be used under a condition, under which a handheld optical scanning device is used for scanning a displaying medium plotted with the microdot matrix, for recognizing locations and movements of the optical scanning device moving on the microdot matrix. However, whether the prior art mentioned in FIG. 1 can work well is highly restricted by resolution of the optical scanning device or the microdot matrix. As can be observed from FIG. 1, the frame 102 has to cover at least one complete microdot block 120 so as to decode an effective coordinate for recognizing a corresponding location of the frame 102 on the microdot matrix. However, if a resolution of the optical scanning device or the microdot matrix is over-high so that the frame 102 is not large enough to cover at least one complete microdot block 120, any coordinate corresponding to the frame 102 can not be decoded because of lack of required information; at this time, the prior art mentioned in FIG. 1 is not available in locating the frame 102. Moreover, orientations of the frame 102 and each the microdot block 120 covered by the frame 102 are usually inconsistent with each other, that is, there may be an included angle, which is larger than 0 degree and less than 180 degree, between a first two-dimensional axis for the frame 102 and a second two-dimensional axis for each the microdot block 120 covered by the frame 102. Note that in FIG. 1, two-dimensional axes of the frame 102 and each the microdot block 120 covered by the frame 102 are consistent with each other. If the frame 102 shown in FIG. 1 is rotated with an angle, which is larger than 0 degree and less than 180 degree, the coordinate corresponding to the frame 102 can not be decoded as well because any complete microdot block 120 is not fetched in the frame 102. Low cost and high resolution are always primary aims in researching a conventional optical scanning device or a microdot matrix implemented with smaller arrays. Therefore, for solving the abovementioned defects so as to meet the requirement that at least one complete microdot block 120 is scanned in the frame 102, reducing resolution should not be an effective solution.